﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Quote Line Item Editor</title>

    <link href="../../sparkle_/css/sparkle_jquery_ui.css" rel="stylesheet" />
    <link href="../../sparkle_/css/sparkle.css" rel="stylesheet" />

    <style>
        #quoteproductGrid {
            padding-top: 0px;
            padding-left: 0px;
            padding-right: 2px;
            padding-bottom: 2px;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            height: 200px;
        }


        #quoteProducts {
            margin-left: 0px;
            margin-right: 0px;
        }
    </style>
</head>
<body class="sparkle-xrm">
    
    <!--ko template: { name: 'xrmPleaseWaitBlock', data: {isBusy : isBusy, isBusyProgress : isBusyProgress, isBusyMessage : isBusyMessage}} --><!--/ko-->
    <div data-bind="visible:isEditForm()">

    <!-- Quote Product Editor Grid-->
    <div id="quoteProducts">
        <span id="toolbar" class="sparkle-gridtoolbar">
            <button id="save" data-bind="click: saveCommand(), disable: isBusy()" class="gridtoolbar-button save16">Save</button>
            <button id="delete" data-bind="click: deleteCommand(), disable: isBusy()" class="gridtoolbar-button delete16">Delete</button>
            <button id="moveup" data-bind="click: moveUpCommand(), disable: isBusy()" class="gridtoolbar-button">Move Up</button>
            <button id="movedown" data-bind="click: moveDownCommand(), disable: isBusy()" class="gridtoolbar-button">Move Down</button>
        </span>
        <div id="quoteproductGrid"></div>
        <div id="quoteproductPager"></div>
    </div>

    <!-- Delivery Address Form -->
    <div data-bind='validationOptions: { messageTemplate: "xrmControlValidationMessage" }'>
        <div data-bind='with: selectedQuoteDetail'>
            <div data-bind="template: { name: 'sparkle-form-tab-header', data: { title: 'Delivery' } }"></div>
            <table class="sparkle-FormSection" columns="2" label="General" style="table-layout: fixed;" height="1%" valign="top" cellspacing="0" cellpadding="3">
                <colgroup>
                    <col width="130">
                    <col>
                    <col width="130">
                    <col>
                </colgroup>
                <tbody>
                    <tr valign="top">
                        <!--ko template: { name: 'sparkle-form-field', data: { 
                            label: 'Requested Date',
                            field:requestdeliveryby,
                            required:0,
                            type:'datetime',
                            disable:false, 
                            visible:true } }-->
                        <!--/ko-->

                        <!--ko template: { name: 'sparkle-form-field', data: { 
                            label: 'Sales Person',
                            field:salesrepid,
                            required:0,
                            type:'lookup',
                            disable:false, 
                            visible:true, 
                            queryCommand: $root.salesRepSearchCommand,
                            typeCodeAttribute: '', 
                            idAttribute:'systemuserid',
                            nameAttribute:'fullname' } }-->
                        <!--/ko-->
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    </div>
    <!-- Start of Scripts-->
    <script src="../../ClientGlobalContext.js.aspx" type="text/javascript"></script>

    <!-- Sparkle Xrm dependancies -->
    <script src="../../sparkle_/js/SparkleXrmUI_Dependancies.js"></script>

    <!-- Sparkle Xrm -->
    <script src="../../sparkle_/js/mscorlib.js" type="text/javascript"></script>
    <script src="../../sparkle_/js/SparkleXrm.js" type="text/javascript"></script>
    <script src="../../sparkle_/js/SparkleXrmUI.js" type="text/javascript"></script>

    <!-- Client Code -->
    <script src="../js/Client.js" type="text/javascript"></script>
    <script type="text/javascript">
        Client.QuoteLineItemEditor.Views.QuoteLineItemEditorView.init();
    </script>
</body>
</html>
